<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<title>new html</title>
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="E0.3.1.js"></script>
<script id="ss1" onload="alert(this.innerHTML)" src="http://engine.100fenlm.cn/js/engine.jsp?divid=lm100fen111&rid=1595&wid=17919&w=0&h=0&stype=2&minute=100"></script>


<script type="text/javascript">

	function f1(e){console.log('f1');}
	function f2(e){console.log('f2');}
	function f3(e){
		e.preventDefault();
		console.log(e.isDefaultPrevented());
	}
	


	window.onload = function(){
		//alert(document.getElementById('ss1'));

		var d1 = document.getElementById('d1');
		var ds = document.getElementsByTagName('div');

		//E.add(d1,'click',f1);
		//E.add(d1,'click',f2);
		//E.add(d1,'click',f2);
		//E.add(d1,'click',f3);
		//E.add(d1,'mouseover',f3,true);

		//E.dispatch(d1,'click');
		//E.remove(d1,'click',f2);

		//E.remove(d1,'click');

		//E.remove(d1);
		

		//var pa = new Panel('d2');
		//E.add(pa,'click',f1);
		//E.add(pa,'click',f2);
		//alert('click' in pa);

		
		var obj = {aa:33}

		var pp = new Panel('d2');
		var pp2 = new Person('jack');
		var opt = new Option('1','1');
		//console.log(pp2);
		console.log(isPlainObject(obj));
		console.log(isPlainObject(pp2));
		console.log(isPlainObject(document.body));
		console.log(isPlainObject(null));
		console.log(isPlainObject(undefined));
		console.log(isPlainObject(d1));
		console.log(isPlainObject(ds));
		
		console.log(isPlainObject(document.body.childNodes));
		console.log(isPlainObject(opt));
		//console.log({}.toString.call(argumnts));
		
		//alert(Object.prototype.toString.call(d1))
		//alert(document.body.childNodes )


		function a(){alert(arguments[0])}
		console.log(a.constructor)
		function b(){
			var ary = [33,44]
			var obj1 = {0:'zero',1:'one',length:2};
			var obj2 = {0:'zero',1:'one',length:2,constructor:Array};
			var obj3 = {0:'zero',1:'one'};
			//alert(isArray(obj))
			a.apply(null,obj1)
			a.apply(null,obj2)
			a.apply(null,obj3)
		}

		b();

	}





function Person(name){
	this.name=name;

}
function Panel(id) {
	this.el = document.getElementById(id);
	var self = this;
	E.add(this.el,'click',function(){self.onClick()});
	
}
Panel.prototype.onClick = function() {
	this['click']();
}

	

</script>
</head>
<body>

<a id="a1" href="http://www.g.cn">google</a>
<div id="d1">Div1 Element</div>


<div id="d2">Div2 Element</div>

<input id="i1" type="text"/><input type="button" value="check" onclick="check(event)"/>

</body>
</html>
